﻿using Microsoft.VisualStudio.TestTools.UnitTesting;
using System;
using System.Collections.Generic;

namespace ExamTests
{
    [TestClass]
    public class TripleRegexTest
    {
        [TestMethod]
        public void ExtractTriplesFromTextTest()
        {
            TripleRegex target = new TripleRegex();
            string text = "Pesho is (0,5,4) and not (3, 4, 5).But how about (3, a2, 5,3)";
            List<Triple> expected = new List<Triple>() { new Triple(3, 4, 5) };
            List<Triple> actual = target.ExtractTriplesFromText(text);
            Assert.AreEqual(actual.Count, 1);
            Triple result = actual[0];
            Assert.AreEqual(result.A, 3);
            Assert.AreEqual(result.B, 4);
            Assert.AreEqual(result.C, 5);
        }
    }
}